<div class="container-fluid">
  <div class="card card-query">
    <div class="content">
      <div class="row">
        <div class="col-md-3">
          <h4 class="title">群组状态</h4>
          <div class="form-group">
            <select class="form-control" ng-model="queryParams.status">
              <option value="">全部</option>
              <option value="0">启用</option>
              <option value="1">停用</option>
            </select>
          </div>
        </div>
        <div class="col-md-9">
          <h4 class="title">群组名称</h4>
            <div class="input-group form-group">
              <input type="text" ng-model="queryParams.name" class="form-control" placeholder="输入群组名称">
              <span class="input-group-btn">
                <button type="button" class="btn btn-info" ng-click="queryGroup()">搜索</button>
                <button type="button" class="btn btn-info" ng-click="editGroup()">创建</button>
              </span>
            </div>
      </div>
      </div>
    </div>
  </div>
  <div class="card card-query">
    <div class="content">
      <h4 class="title" ng-show="parentId!=0"> 
        <span class="label label-info"><i class="fa fa-align-right"></i> 上级：{{parentGroup.name}}</span>
        <button type="button" class="btn btn-warning  pull-right" ng-click="gotoList(parentGroup.parentId)">返回上级</button>
      </h4>
      <table ng-table="tableOptions" class="table table-striped ng-table">
      </table>
    </div>
  </div>
</div>


<script type="text/ng-template" id="group-edit.html">
  <div class="form-group" ng-show="formData.parentId!=0">
    <label class="control-label">父级</label> 
  	<input type="text" readonly class="form-control" ng-model="formData.parentName"></input>
  </div>
  <div class="form-group" ng-class="{'has-error':editForm.name.$error.required}">
    <label class="control-label">名称</label> 
  	<input type="text" class="form-control" name="name" ng-model="formData.name" required></input>
  </div>
  
  <div class="form-group">
  	<label class="control-label">类型</label> 
	<div>
		<label class="radio-inline"> 
			<input ng-icheck type="radio" ng-model="formData.type" ng-value="0" ng-checked="true" /> 父级
		</label>
		<label class="radio-inline"> 
			<input ng-icheck type="radio" ng-model="formData.type" ng-value="1" /> 子级
		</label>
	</div>
  </div>

  <div class="form-group">
    <label class="control-label">排序</label> 
    <input type="number" class="form-control" ng-model="formData.order"></input>
  </div>
  <div class="form-group">
  	<label class="control-label">状态</label> 
	<div>
		<label class="radio-inline"> 
			<input ng-icheck type="radio" ng-model="formData.status" ng-value="0" ng-checked="true" /> 启用
		</label>
		<label class="radio-inline"> 
			<input ng-icheck type="radio" ng-model="formData.status" ng-value="1" /> 停用
		</label>
	</div>
  </div>
  <div class="form-group">
  	<label class="control-label">描述</label> 
	<textarea class="form-control" ng-model="formData.remark" rows="3"></textarea>
  </div>
</script>

